package com.hengpeng.msls.expresslogin.common;

import javax.servlet.http.HttpServletRequest;

import com.hengpeng.itfinbase.persist.MemberShare.UserType;
import com.hengpeng.msls.expresslogin.ExpressNotifyService;
import com.hengpeng.msls.expresslogin.dto.LoginResultDto;

public class CommonResponseServiceImpl implements ExpressNotifyService
{
	@Override
	public LoginResultDto validataNotify(HttpServletRequest request, UserType userType)
	{
//		LoginResultDto dto = new LoginResultDto(false, userType);
//		String partner = StoreConfigUtil.getStoreParameter(request, ExpressConstants.store_expresslogin_partner);
//		String key = StoreConfigUtil.getStoreParameter(request, ExpressConstants.store_expresslogin_key);
//		String uid = request.getParameter("userid");
//		String sign = request.getParameter("sign");
//		String timestamp = request.getParameter("timestamp");
//
//		// String realname = request.getParameter("realname");
//		// String email = request.getParameter("email");
//		// String mobile = request.getParameter("mobile");
//		// String idcard = request.getParameter("idcard");
//
//		if (uid == null || sign == null || timestamp == null || timestamp.trim().equals("") || uid.trim().equals("")
//				|| sign.trim().equals(""))
//		{
//			return dto;
//		}
//		String md5Str = SignatureHelper.generateMD5Signture(partner + key + uid + timestamp, ExpressConstants.charset);
//		if (md5Str.equals(sign))
//		{
//			Date date = CalendarUtil.parseLongDateNoSplit(timestamp);
//			if (System.currentTimeMillis() <= (date.getTime() + (5L * 60L * 1000L)))
//			{
//				dto.setIsSuccess(true);
//				dto.setUserId(uid);
//			}
//		}
//		return dto;
		return null;
	}
}
